<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="css/bootstrap.min.css"
	>

<script src="js/jquery-1.11.1.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="js/bootstrap.min.js"
	></script>
</head>
<body>
		<form action="${pageContext.request.contextPath }/Registerervlet">
			<div class="form-group">
				<label for="exampleInputEmail1">用户名</label> <input
					type="text" class="form-control" id="exampleInputEmail1" name="username"
					placeholder="username">
					<span id="checkmsg"></span>
			</div>
			<div class="form-group">
				<label for="exampleInputPassword1">密码</label> <input
					type="password" class="form-control" id="exampleInputPassword1" name="password"
					placeholder="Password">
			</div>
			<div class="form-group">
				<label for="exampleInputPassword1">确认密码</label> <input
					type="password" class="form-control" id="exampleInputPassword1" name="psssword2"
					placeholder="Password">
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">email</label> <input
					type="email" class="form-control" id="exampleInputEmail1" name="emial"
					placeholder="Email">
			</div>
			<button type="submit" class="btn btn-default">注册</button>
		</form>
	</div>
</body>


	
<script type="text/javascript">
$('#exampleInputEmail1').blur(function(){
	$.ajax( {  
	    url:'/029Web/UserCheckServlet',// 跳转到 action  
	    data:{  
	    	username : $(this).val()
	    },  
	    type:'get',    
	    success:function(data) {
	    	 //console.log(data)
	    	 $("#checkmsg").html(data);
	     }			
	});
})
</script>
</html>